package com.upb.webserver.dao.entity;

import com.upb.webserver.common.enums.PlatformEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import java.io.Serializable;
import java.util.Date;

@Data
@ToString
@NoArgsConstructor
@EqualsAndHashCode
public class TbApplication implements Serializable {

    public TbApplication(Byte createStatus) {
        this.createStatus = createStatus;
    }

    public TbApplication(int chainId, String name) {
        this.chainId = chainId;
        this.name = name;
    }

    public TbApplication(Byte chainType, int chainId) {
        this.chainType = chainType;
        this.chainId = chainId;
    }

    public TbApplication(PlatformEnum platformEnum, int creatorAccountId) {
        this.createFromPlatform = platformEnum.getId();
        this.createBy = creatorAccountId;
    }

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_application.id
     *
     * @mbg.generated
     */
    private Integer id;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_application.remote_id
     *
     * @mbg.generated
     */
    private Integer remoteId;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_application.name
     *
     * @mbg.generated
     */
    private String name;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_application.final_name
     *
     * @mbg.generated
     */
    private String finalName;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_application.name_zh
     *
     * @mbg.generated
     */
    private String nameZh;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_application.version
     *
     * @mbg.generated
     */
    private String version;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_application.chain_id
     *
     * @mbg.generated
     */
    private Integer chainId;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_application.chain_type
     *
     * @mbg.generated
     */
    private Byte chainType;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_application.create_status
     *
     * @mbg.generated
     */
    private Byte createStatus;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_application.create_from_platform
     *
     * @mbg.generated
     */
    private Byte createFromPlatform;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_application.create_by
     *
     * @mbg.generated
     */
    private Integer createBy;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_application.gmt_create
     *
     * @mbg.generated
     */
    private Date gmtCreate;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_application.gmt_modified
     *
     * @mbg.generated
     */
    private Date gmtModified;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_application.description
     *
     * @mbg.generated
     */
    private String description;

    /**
     *
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column tb_application.remark
     *
     * @mbg.generated
     */
    private String remark;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table tb_application
     *
     * @mbg.generated
     */
    private static final long serialVersionUID = 1L;
}
